from django.conf.urls import url

from areas import views

# urlpatterns = [
#     url(r'^areas/$', views.AreaView.as_view()),
#     url(r'^areas/(?P<pk>\d+)/$', views.AreaDetailView.as_view())
# ]

urlpatterns = [

]

# 改写为视图集
from rest_framework.routers import DefaultRouter

from areas.views import AreaViewSet

router = DefaultRouter()
router.register(prefix='areas', viewset=AreaViewSet, base_name='areas')
urlpatterns += router.urls